// 导入组件
import Vue from 'vue';
import Router from 'vue-router';
// 登录
import login from '@/views/login';
// 首页
import index from '@/views/index';
/**
 * 基础菜单
 */

/**
 * 数据监控
 */

// 图表界面
import statistics from '@/views/charts/statistics';

//新增
import Music from '@/views/goods/Music';
import Sheet from "../views/goods/Sheet";
import User from "../views/goods/User";
import Singer from "../views/goods/Singer";
import Banner from "../views/goods/Banner";
import Problem from "../views/system/Problem";

// 启用路由
Vue.use(Router);

// 导出路由
export default new Router({
  routes: [{
    path: '/',
    name: '',
    component: login,
    hidden: true,
    meta: {
      requireAuth: false
    }
  }, {
    path: '/login',
    name: '登录',
    component: login,
    hidden: true,
    meta: {
      requireAuth: false
    }
  }, {
    path: '/index',
    name: '首页',
    component: index,
    iconCls: 'el-icon-tickets',
    children: [{
      path: '/charts/statistics',
      name: '数据可视化',
      component: statistics,
      meta: {
        requireAuth: true
      }
    }, {
      path: '/goods/music',
      name: '音乐管理',
      component: Music,
      meta: {
        requireAuth: true
      }
    }, {
      path: '/goods/sheet',
      name: '歌单管理',
      component: Sheet,
      meta: {
        requireAuth: true
      }
    }, {
      path: '/goods/user',
      name: '用户管理',
      component: User,
      meta: {
        requireAuth: true
      }
    }, {
      path: '/goods/singer',
      name: '歌手管理',
      component: Singer,
      meta: {
        requireAuth: true
      }
    }, {
      path: '/goods/banner',
      name: 'Banner管理',
      component: Banner,
      meta: {
        requireAuth: true
      }
    }, {
        path: '/system/problem',
        name: '用户反馈',
        component: Problem,
        meta: {
          requireAuth: true
        }
      }
    ]
  }]
})
